﻿@model  System.Data.Entity.DbSet<ABMyFconBD.Models.Alumno>
@{
   ViewBag.Title = "Index";
}

<h2>Tabla de alumnos</h2>

<table>
   <thead>
       <tr>
           <th>ID</th>           
           <th>Nombre</th>
           <th>Apellido</th>
           <th>Opciones</th>
       </tr>
   </thead>
   <tbody>
       @foreach (var item in Model)
       {
       <tr>
           @*<td>@item.id</td>*@
           <td>@item.id</td>
           <td>@item.nombre</td>
           <td>@item.apellido</td>
           <td>
               <a href="@Url.Action("Editar")?id=@item.id">Editar</a>
           </td>
           <td>
               <a href="@Url.Action("Borrar", "Home", new {id=@item.id })" >Borrar</a>
           </td>
       </tr>
       }
   </tbody>
   <tfoot>
       <tr>
           <td colspan="3"><div style="text-align: center">Total: @Model.ToList().Count()</div></td>
       </tr>
   </tfoot>
</table>

<a href="@Url.Action("Agregar")">Agregar</a>
